<template>
	<view class="index_history">
		<ABanner :isSeach="false" :highLight="highLight" @sendNum="handleTab" :menuList="['流量记录']"></ABanner>
		<!-- <ABannerTab @sendNum="getNum" :itemData="['帖子记录']"></ABannerTab> -->
		<!-- 	<template v-if="num===0">
			<Shop></Shop>
		</template> -->
		<!-- <template v-if="num===1"> -->
		<Forum :refresh="flag"></Forum>
		<!-- </template> -->
	</view>
</template>

<script>
	import Shop from '@/pages/user/history/ShopRecord.vue'
	import Forum from '@/pages/user/history/ForumRecord.vue'
	export default {
		components: {
			Forum,
			Shop
		},
		onReachBottom() {
			uni.$emit('onBottom')
		},
		onPullDownRefresh() {
			this.flag = true
			setTimeout(() => {
				uni.stopPullDownRefresh();
				this.flag = false
			}, 1000);
		},
		data() {
			return {
				flag: false,
				childArr: ['商品记录', '论坛记录'],
				num: 0,
			}
		},
		methods: {
			getNum(val) {
				this.num = val
			}
		}
	}
</script>

<style>
</style>